package com.wuhanpe.leafid.logger

import com.p6spy.engine.common.StatementInformation
import com.p6spy.engine.logging.LoggingEventListener
import java.sql.SQLException

/**
 * @author zooy
 * @since 2025/9/12-14:40
 */
class MybatisPlusLoggingEventListener: LoggingEventListener() {

    companion object {

        var INSTANCE: MybatisPlusLoggingEventListener? = null

        fun getInstance(): MybatisPlusLoggingEventListener {
            if (null == INSTANCE) {
                INSTANCE = MybatisPlusLoggingEventListener()
            }

            return INSTANCE!!
        }
    }

    override fun onAfterExecuteBatch(
        statementInformation: StatementInformation?,
        timeElapsedNanos: Long,
        updateCounts: IntArray?,
        e: SQLException?
    ) {
    }
}
